package com.fan;

import com.fan.config.AppConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
    public static void main(String[] args) {
        try {


            AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
//            context.getBeanFactory().getBeanNamesIterator().forEachRemaining(System.out::println);
            Object bean = context.getBean("testServiceImpl");
            System.out.println(bean);

        } catch (Exception e) {
            e.printStackTrace();
        }


    }
}
